/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package py.com.peluq.model.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Diego_M
 */
@Entity
@Table(name = "arqueo", catalog = "peludb", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Arqueo.findAll", query = "SELECT a FROM Arqueo a"),
    @NamedQuery(name = "Arqueo.findByArqcod", query = "SELECT a FROM Arqueo a WHERE a.arqcod = :arqcod"),
    @NamedQuery(name = "Arqueo.findByFecha", query = "SELECT a FROM Arqueo a WHERE a.fecha = :fecha"),
    @NamedQuery(name = "Arqueo.findByHora", query = "SELECT a FROM Arqueo a WHERE a.hora = :hora"),
    @NamedQuery(name = "Arqueo.findByMontoEf", query = "SELECT a FROM Arqueo a WHERE a.montoEf = :montoEf"),
    @NamedQuery(name = "Arqueo.findByMontoCh", query = "SELECT a FROM Arqueo a WHERE a.montoCh = :montoCh"),
    @NamedQuery(name = "Arqueo.findByMontoTarj", query = "SELECT a FROM Arqueo a WHERE a.montoTarj = :montoTarj")})
public class Arqueo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "Arq_cod", nullable = false)
    private Integer arqcod;
    @Column(name = "fecha")
    private Integer fecha;
    @Column(name = "hora")
    private Integer hora;
    @Column(name = "monto_ef")
    private Integer montoEf;
    @Column(name = "monto_ch")
    private Integer montoCh;
    @Column(name = "monto_tarj")
    private Integer montoTarj;
    @JoinColumn(name = "ci_emp", referencedColumnName = "ci_emp", nullable = false)
    @ManyToOne(optional = false)
    private Empleado ciEmp;
    @JoinColumn(name = "ap_nro", referencedColumnName = "ap_nro", nullable = false)
    @ManyToOne(optional = false)
    private AperCierre apNro;

    public Arqueo() {
    }

    public Arqueo(Integer arqcod) {
        this.arqcod = arqcod;
    }

    public Integer getArqcod() {
        return arqcod;
    }

    public void setArqcod(Integer arqcod) {
        this.arqcod = arqcod;
    }

    public Integer getFecha() {
        return fecha;
    }

    public void setFecha(Integer fecha) {
        this.fecha = fecha;
    }

    public Integer getHora() {
        return hora;
    }

    public void setHora(Integer hora) {
        this.hora = hora;
    }

    public Integer getMontoEf() {
        return montoEf;
    }

    public void setMontoEf(Integer montoEf) {
        this.montoEf = montoEf;
    }

    public Integer getMontoCh() {
        return montoCh;
    }

    public void setMontoCh(Integer montoCh) {
        this.montoCh = montoCh;
    }

    public Integer getMontoTarj() {
        return montoTarj;
    }

    public void setMontoTarj(Integer montoTarj) {
        this.montoTarj = montoTarj;
    }

    public Empleado getCiEmp() {
        return ciEmp;
    }

    public void setCiEmp(Empleado ciEmp) {
        this.ciEmp = ciEmp;
    }

    public AperCierre getApNro() {
        return apNro;
    }

    public void setApNro(AperCierre apNro) {
        this.apNro = apNro;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (arqcod != null ? arqcod.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Arqueo)) {
            return false;
        }
        Arqueo other = (Arqueo) object;
        if ((this.arqcod == null && other.arqcod != null) || (this.arqcod != null && !this.arqcod.equals(other.arqcod))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.peluq.model.entity.Arqueo[ arqcod=" + arqcod + " ]";
    }
    
}
